package beans;

import java.io.Serializable;

import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.bean.ViewScoped;
import javax.faces.event.ActionEvent;


@ManagedBean
@ViewScoped
public class Controller implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4681182771473751700L;
	private String text="";
	private int firstOperand;
	private int secondOperand;
	private int total;

	public Controller() {

	}

	
	public String getText() {
		return text;
	}


	public void setText(String text) {
		this.text = text;
	}


	public int getFirstOperand() {
		return firstOperand;
	}


	public void setFirstOperand(int firstOperand) {
		this.firstOperand = firstOperand;
	}


	public int getSecondOperand() {
		return secondOperand;
	}


	public void setSecondOperand(int secondOperand) {
		this.secondOperand = secondOperand;
	}


	public int getTotal() {
		return total;
	}


	public void setTotal(int total) {
		this.total = total;
	}


	public void calculateTotal(ActionEvent actionEvent) {
		total = firstOperand + secondOperand;
	}

}
